﻿// ******************************************************************
// 文件名：MessageTypes.cs（VS 2022 活字格 V11 版）
// ******************************************************************

using GrapeCity.Forguncy.Plugin;
using System.Collections.Generic;

namespace SendWeChatCardMessage
{
    /* ---------- 单条实体 ---------- */
    [ObjectProperty] public class TextMessage { public string Text { get; set; } = ""; }

    [ObjectProperty] public class ImageMessage { public string FilePath { get; set; } = ""; }

    [ObjectProperty] public class VoiceMessage { public string FilePath { get; set; } = ""; }

    [ObjectProperty] public class VideoMessage { public string FilePath { get; set; } = ""; }

    [ObjectProperty] public class FileMessage { public string FilePath { get; set; } = ""; }

    [ObjectProperty]
    public class TextCardMessage
    {
        public string Title { get; set; } = "";
        public string Description { get; set; } = "";
        public string Url { get; set; } = "";
    }

    [ObjectProperty]
    public class MarkdownMessage
    {
        public string Markdown { get; set; } = "";
    }

    [ObjectProperty]
    public class MiniProgramNoticeMessage
    {
        public string Title { get; set; } = "";
        public string Page { get; set; } = "pages/index/index";
    }

    /* ---------- 图文专用 ---------- */
    [ObjectProperty]
    public class NewsArticle
    {
        public string Title { get; set; } = "";
        public string Description { get; set; } = "";
        public string Url { get; set; } = "";
        public string PicUrl { get; set; } = "";
    }

    [ObjectListProperty(typeof(NewsArticle))]
    public class NewsMessage : List<NewsArticle> { }
}